export const expCodes1 = [
  { code: 'id', name: '日期' },
  { code: 'dayAheadClearPrice', name: '修正前-现货日前出清价' },
  { code: 'dayAheadPriceForecast', name: '修正前-现货日前出清价预测' },
  { code: 'realtimeClearPrice', name: '修正前-现货实时出清价' },
  { code: 'realtimePriceForecast', name: '修正前-现货实时出清价预测' },
  { code: 'clearDifferencePrice', name: '修正前-现货出清价差' },
  { code: 'priceDifferenceForecast', name: '修正前-现货出清价差预测' },
  { code: 'revisedDayAheadClearPrice', name: '修正后-现货日前出清价' },
  { code: 'revisedDayAheadPriceForecast', name: '修正后-现货日前出清价预测' },
  { code: 'revisedRealtimeClearPrice', name: '修正后-现货实时出清价' },
  { code: 'revisedRealtimePriceForecast', name: '修正后-现货实时出清价预测' },
  { code: 'revisedClearDifferencePrice', name: '修正后-现货出清价差' },
  { code: 'revisedPriceDifferenceForecast', name: '修正后-现货出清价差预测' },
  { code: 'priceDifferenceConfidence', name: '价差置信度' },
];

export const expCodes2 = [
  { code: 'id', name: '日期' },
  { code: 'dayAheadTransition', name: '修正前-现货日前过渡价' },
  { code: 'dayAheadTransitionForecast', name: '修正前-现货日前过渡价预测' },
  { code: 'realtimeLineTransitionClear', name: '修正前-现货实时出清价' },
  { code: 'realtimeLineTransitionClearForecast', name: '修正前-现货实时出清价预测' },
  { code: 'dayAheadTransitionPriceDifference', name: '修正前-现货日前过渡实时价差' },
  { code: 'dayAheadTransitionPriceDifferenceForecast', name: '修正前-现货日前过渡实时价差预测' },
  { code: 'revisedDayAheadTransition', name: '修正后-现货日前过渡价' },
  { code: 'revisedDayAheadTransitionForecast', name: '修正后-现货日前过渡价预测' },
  { code: 'revisedRealtimeLineTransitionClear', name: '修正后-现货实时出清价' },
  { code: 'revisedRealtimeLineTransitionClearForecast', name: '修正后-现货实时出清价预测' },
  { code: 'revisedDayAheadTransitionPriceDifference', name: '修正后-现货日前过渡实时价差' },
  {
    code: 'revisedDayAheadTransitionPriceDifferenceForecast',
    name: '修正后-现货日前过渡实时价差预测',
  },
  { code: 'baseRatio', name: '基数比例' },
  { code: 'baseRatioForecast', name: '基数比例预测' },
  { code: 'differencePriceConfidenceTransition', name: '价差置信度' },
];

export const priceDirectionOptions = [
  { label: '全部', value: 1 },
  { label: '平衡版本', value: 2 },
  { label: '保守版本', value: 3 },
  { label: '激进版本', value: 4 },
  { label: '固定版本', value: 5 },
];

export const expCodes3 = (version) => {
  let str = '';
  const item = priceDirectionOptions.find((x) => x.value === version);
  if (item) {
    str = item.label;
  }
  return [
    { code: 'id', name: '日期' },
    { code: 'forePriceDiff', name: `${str}-价差方向预测值` },
    { code: 'spreadDirection', name: `${str}-价差方向` },
    { code: 'dayAheadClearPrice', name: `${str}-日前电价` },
    { code: 'realtimeClearPrice', name: `${str}-实时电价` },
    { code: 'foreDiffProb', name: `${str}-置信度` },
  ];
};
